package zzzhc.image.recognize.nn;

import java.io.Serializable;

public class NNOutputItem implements Serializable {

	private static final long serialVersionUID = -957903843010154691L;

	private double[] data;

	private char code;

	public char getCode() {
		return code;
	}

	public void setCode(char code) {
		this.code = code;
	}

	public double[] getData() {
		return data;
	}

	public String getDataString() {
		if (data == null) {
			return "";
		}
		StringBuilder sb = new StringBuilder();
		for (double d : data) {
			sb.append(d).append(";");
		}
		if (sb.length() > 0) {
			sb.setLength(sb.length() - 1);
		}
		return sb.toString();
	}

	public void setData(double[] data) {
		this.data = data;
	}

}
